package liangtWorkSpace.threadDemo.ATM;

/**
 * @ClassName PersonA
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/7/4 17:50
 */
public class PersonB extends Thread{
    Bank bank;

    public PersonB(Bank bank){
        this.bank = bank;
    }

    @Override
    public void run(){
        while (Bank.money >= 100){
            bank.ATM(100);
            try {
                sleep(100);
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }
}
